import type * as Event from "./type"
import { request } from "@/http/axios"

// 创建事件
export function createEvent(data: Event.EventTableData) {
  return request({
    url: "/events/create",
    method: "post",
    data
  })
}

/** 列表 */
export function getEventList(params: Event.EventResponseData) {
  return request<Event.TableResponseData>({
    url: "/events/page",
    method: "get",
    params
  })
}

/** 详情 */
export function getEventById(id: number) {
  return request<Event.EventTableData>({
    url: `/events/detail?id=${id}`,
    method: "get"

  })
}
